#include <app\states\cacheState.h>
#include <app\states\statesFactory.h>

int cacheState::class_type_id = CACHE_STATE_TYPE_ID;

REGISTER_STATE(CACHE_STATE_TYPE_ID, cacheState);

sessionState *
cacheState::create() {
  return new cacheState();
} 

void 
cacheState::setCacheDir(string _cachedir) {
  cachedir.pushDirectory(_cachedir);

  Poco::File dir(cachedir);
  dir.createDirectories();
}

Poco::Path 
cacheState::getCacheDir() {
  return cachedir;
}

int 
cacheState::getClassTypeId() {
  return cacheState::class_type_id;
}

int
cacheState::getTypeId() {
  return type_id;
}

cacheState::cacheState() : type_id(CACHE_STATE_TYPE_ID), cachedir("") {

}

cacheState::~cacheState() {

}